<div class="products index">
    <h2><?php echo __('Listado de Productos'); ?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('Nombre'); ?></th>
            <th><?php echo $this->Paginator->sort('Descripcion'); ?></th>
            <th class="actions"><?php echo __('Opciones'); ?></th>
        </tr>
        <?php foreach ($products as $product): ?>
            <tr>
                <td><?php echo h($product['Product']['name']); ?>&nbsp;</td>
                <td><?php echo h($product['Product']['description']); ?>&nbsp;</td>
                <td class="actions">
                    <?php // echo $this->Html->link(__('View'), array('action' => 'ver', $product['Product']['id'])); ?>
                    <?php echo $this->Html->link(__('Editar'), array('action' => 'edit', $product['Product']['id'])); ?>

                    <?php if ($this->Session->read('Auth.User.role') == 'root'): ?>
                        <?php echo $this->Form->postLink(__('Borrar'), array('action' => 'delete', $product['Product']['id']), null, __('Are you sure you want to delete # %s?', $product['Product']['id'])); ?>
                    <?php endif; ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>

    <?php echo $this->element('footer/paginator') ?>

</div>

<?php echo $this->element('menues/products') ?>
